from selenium.webdriver.common.by import By

from common.base import Base


class CraetOrderAssert(Base):
    def search_assert(self):
        content1 = self.get_element_text((By.XPATH, "//h6"))
        content2 = content1.split(':')
        return content2[0]

    # 支付成功之后返回首页
    def return_home_page(self):
        self.click((By.LINK_TEXT, "返回首页"))
